<table class="cssTable tblSort" id="tbl_qprov" rules="all" width="100%" border="1">
<thead>
<tr>

<th>Codigo</th>
<th>Raz&oacute; Social</th>
<th>Documento Fiscal</th>
<th>Direcci&oacute;</th>
<th>Estado</th>
<th>Contacto</th>
</thead>
<tbody>
<?php 
include('../../Connections/KRAPPERCON.php');
$sql = 'call sp_selProv(0);';
$res = $mysqli->query($sql);
if ($res){
while( $row = $res->fetch_assoc()){
?>
<tr>
<!-- <td><input type="button" value="Detalle" onclick="verProv('<?php echo $row['ProveedID']?>')" /></td>-->
<td><a href="#" class="a bld" ><?php echo $row['ProveedID'] ?></a></td>
<td><?php echo $row['ProveedRaz'] ?></td>
<td><?php echo $row['ProveedNIF'] ?></td>
<td><?php echo $row['ProveedDir'] ?></td>
<td><?php if ($row['ProveedSts']==1) echo 'Si'; else { echo 'No'; } ?></td>
<td><?php echo $row['ContactoNom'] ?></td>
</tr>
<?php
}
$res->close();
$mysqli->next_result();
}
?>
<tbody>
<tfoot></tfoot>
</table>
<script type="text/javascript">
function verProv(prov){
	loadPage('Mantenimientos/MantProv.php',{buscod : $(prov).html()});
}

$("#tbl_qprov tbody .a").each(function(){
	this.href = '#page/Mantenimientos/MantProv.php?buscod='+this.innerHTML;
});
</script>
